require "set"

name_filter :tags do |names, configurations, options|
  tags = (options[:tags] || "").split(",").map { |tag| tag.to_sym }.to_set
  names.delete_if do |name|
    !tags.subset?(configurations[name].tags.to_set)
  end
  
end

